/*--------------------------------------------------------------
 * File: demo18.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 判断闰年
 * Version 0.1
 * Date 2022-01-03 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int year = 0;
    printf("请输入年份：");
    scanf("%d",&year);

    if(year % 4 == 0)
    {
        if(year % 100 == 0)
        {
            if(year % 400 == 0)
            {
                printf("%d 年是闰年\n",year);
            }
            else
            {
                printf("%d 年不是闰年\n",year);
            }
        }
        else
        {
            printf("%d 年是闰年\n",year);
        }
    }
    else
    {
        printf("%d 年不是闰年\n",year);
    }

    return 0;
}
